Skip to content

#2345: Fix DOCKER_EDITION ignored on Linux - #2362

Open
Hiepiscus wants to merge 6 commits into
devonfw:mainfrom
Hiepiscus:2345-docker-edition-ignored-linux
Open

Hiepiscus wants to merge 6 commits into
devonfw:mainfrom
Hiepiscus:2345-docker-edition-ignored-linux

Conversation

@Hiepiscus

@Hiepiscus Hiepiscus commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

This PR fixes #2345

On Linux, setting DOCKER_EDITION=docker had no effect because the Docker Desktop URL metadata did not contain a Linux download URL. As a result, Docker Desktop could not be selected and Rancher Desktop was installed instead.

While adding Linux support, the Docker Desktop URL updater also had to be adjusted because the previous release notes URL no longer provided the expected content.

Docker Desktop installation on Linux

Docker Desktop requires a different installation than Rancher Desktop. Rancher Desktop is available as a package from its configured package repository and can therefore be installed directly by its package name.

image

Docker Desktop, however is distributed as a separate Debian package. According to the official Docker Desktop , the Docker package repository must first be configured, the Docker Desktop .deb package must then be downloaded separately, and finally the local package must be installed using:

image

Implemented changes:

  • Add Linux support for DockerDesktopUrlUpdater
  • Enable Docker.java to resolve the docker edition on Linux when DOCKER_EDITION=docker is configured.
  • Update the Docker Desktop release notes URL from docs.docker.com/desktop/release-notes to docs.docker.com/desktop/release-notes.md.
  • Adapt the regular expression to extract the Docker Desktop build code from the Markdown release notes.
  • Use the extracted build code to generate the Linux download URL.
  • Download the selected Docker Desktop Debian package through the configured ToolRepository.
  • Add a dedicated package manager command to install the downloaded .deb file
  • Keep docker-desktop as the native package name for version detection and uninstallation.

Testing instructions

  1. Create a local urls-status directory and clone the ide-urls-status repository:
    git clone https://github.com/devonfw/ide-urls-status.git <path-to-ide-urls-status>
  2. Run the DockerDesktopUrlUpdater locally by passing the paths to your local ide-urls and ide-urls-status repositories:
    UpdateInitiator <path-to-ide-urls> <path-to-ide-urls-status> PT1H docker
  3. Verify that the generated Docker Desktop metadata contains a Linux download URL.
  4. Commit the generated metadata in the local ide-urls repository so that it remains available when IDEasy installs Docker Desktop:
cd <path-to-ide-urls>
git add .
git commit -m "Add Docker Desktop metadata for Linux"
  1. On a Linux system, run:
    • Run ide set-edition docker docker
    • Run ide install docker
  2. Verify that Docker Desktop is selected and installed instead of Rancher Desktop.
    • dpkg-query -W docker-desktop
  3. Uninstall Docker Desktop and verify docker-desktop was removed:
    • ide uninstall docker
    • dpkg-query -W docker-desktop

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat and not feature/921 fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summaries what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labelled
    with internal
  • You have not changed any dependency in pom.xml files or otherwise if runtime dependencies changed, you have updated our LICENSE.asciidoc
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Aug 24, 2026
@Hiepiscus Hiepiscus self-assigned this Aug 24, 2026
@Hiepiscus Hiepiscus added urls ide-urls repo and related processes and features docker docker and esp. DockerDesktop linux specific for linux OS (debian, ubunutu, suse, etc.) install installation process of IDE + tools and install commandlet labels Aug 24, 2026
@Hiepiscus Hiepiscus moved this from 🆕 New to Team Review in IDEasy board Aug 24, 2026
@Hiepiscus Hiepiscus changed the title #2345: docker edition ignored linux #2345: Fix DOCKER_EDITION ignored on Linux Aug 24, 2026
@coveralls

coveralls commented Aug 24, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 36714503582

Coverage decreased (-0.05%) to 73.827%

Details

  • Coverage decreased (-0.05%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 69 coverage regressions across 4 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

69 previously-covered lines in 4 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/docker/Docker.java 44 35.59%
com/devonfw/tools/ide/tool/NativePackageManager.java 13 70.41%
com/devonfw/tools/ide/url/tool/docker/DockerDesktopUrlUpdater.java 11 18.18%
com/devonfw/tools/ide/tool/NativePackage.java 1 96.67%

Coverage Stats

Coverage Status
Relevant Lines: 19564
Covered Lines: 15110
Line Coverage: 77.23%
Relevant Branches: 8679
Covered Branches: 5741
Branch Coverage: 66.15%
Branches in Coverage %: Yes
Coverage Strength: 3.31 hits per line

💛 - Coveralls

@Hiepiscus Hiepiscus left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default native package installation is implemented in GlobalToolCommandlet#getInstallPackageManagerCommands. It retrieves the native packages defined by the tool and passes the resolved IDEasy version to each package installation:

protected List<PackageManagerCommand> getInstallPackageManagerCommands(VersionIdentifier resolvedVersion) {
String version = (resolvedVersion == null) ? null : resolvedVersion.toString();
return getNativePackages().stream().map(nativePackage -> nativePackage.install(version)).toList();
}

This behavior works for packages that are installed from a package repository such as Rancher Desktop. The package name and resolved version can be combined to create a version specific package.

For APT, NativePackageManager#getPackageSpec creates this package specification by appending the resolved version and a wildcard to the package name:

public String getPackageSpec(String pkg, String version) {
if ((version == null) || version.isBlank()) {
return pkg;
}
String spec = pkg + this.versionSeparator + version + this.versionWildCard;
if (this.versionWildCard.isEmpty()) {
return spec;
}
return "'" + spec + "'";
}

For a regular repository package, this produces a valid package:
rancher-desktop=1.20.0*

Docker Desktop requires a different installation because it is distributed as a separate Debian package. Applying the default version logic to a downloaded local file would produce an invalid APT argument:
/tmp/docker-desktop-amd64.deb=4.34.0*

Comment thread cli/src/main/java/com/devonfw/tools/ide/tool/docker/Docker.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/tool/docker/Docker.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/tool/docker/Docker.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/tool/docker/Docker.java
@QuangAnhLe
QuangAnhLe self-requested a review August 26, 2026 08:09
@JoelAdbu JoelAdbu self-assigned this Aug 27, 2026
@QuangAnhLe
QuangAnhLe removed their request for review August 27, 2026 11:06
Comment thread cli/src/main/java/com/devonfw/tools/ide/tool/docker/Docker.java
Comment thread cli/src/main/java/com/devonfw/tools/ide/tool/docker/Docker.java Outdated
Comment thread cli/src/main/java/com/devonfw/tools/ide/tool/docker/Docker.java
@hohwille hohwille moved this from Team Review to 👀 In review in IDEasy board Sep 7, 2026
@Hiepiscus
Hiepiscus force-pushed the 2345-docker-edition-ignored-linux branch from 278ea7a to 527d379 Compare September 15, 2026 10:40
@hohwille hohwille added this to the release:2026.10.001 milestone Sep 25, 2026

@hohwille hohwille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hiepiscus thanks for your PR and analysing the problem and finding a solution. 👍
Seems that Linux is making our life quite complex.
I was also thinking of a way to avoid that state in downloadedDebPackageForDocker that could later cause evil side-effect but downloading this whenever getNativePackages() gets called seems even more evil in case the method might get called multiple times... So I cannot suggest anything cleaner on that...

Please resolve the merge conflict and add the issue now to the changelog - I assigned the release as milestone.

*/
public NativePackage(NativePackageManager pm, List<String> packages,
List<String> extraInstallOptions, List<String> setupCommands, List<String> cleanupCommands) {
List<String> extraInstallOptions, List<String> setupCommands, List<String> cleanupCommands, List<String> optionalNativePackageArtifactPaths) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why using List<String> instead of List<Path>?

If you always keep a legacy constructor with the old signature passing to the new constructor, you can avoid changes in other files where this new parameter is not needed keeping your diff smaller.
Also you reduce git merge conflicts for other developers working on similar things in parallel:
https://github.com/devonfw/IDEasy/blob/main/documentation/contributing/coding-conventions.adoc#refactorings
(3. point - is taking about method but a constructor is the same manner here)


@Override
protected List<PackageManagerCommand> getInstallPackageManagerCommands(VersionIdentifier resolvedVersion) {
if (!EDITION_DOCKER.equals(getConfiguredEdition())) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice to have:
if you are repeating this condition 3 times, you could create a private method isDockerDesktopEditionConfigured().

@Hiepiscus
Hiepiscus force-pushed the 2345-docker-edition-ignored-linux branch from 527d379 to 81ed4d6 Compare September 30, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker docker and esp. DockerDesktop install installation process of IDE + tools and install commandlet linux specific for linux OS (debian, ubunutu, suse, etc.) urls ide-urls repo and related processes and features

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

DOCKER_EDITION ignored on Linux

5 participants